home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 25 / CU Amiga Magazine's Super CD-ROM 25 (1998)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1998-08].iso / CUCD / Programming / ixemul / sdk / man / cat3 / assert.0 < prev    next >
Encoding:
Text File  |  1998-06-15  |  1.4 KB  |  39 lines

  1.  
  2. ASSERT(3)                  UNIX Programmer's Manual                  ASSERT(3)
  3.  
  4. NNAAMMEE
  5.      aasssseerrtt - expression verification macro
  6.  
  7. SSYYNNOOPPSSIISS
  8.      ##iinncclluuddee <<aasssseerrtt..hh>>
  9.  
  10.      aasssseerrtt(_e_x_p_r_e_s_s_i_o_n)
  11.  
  12. DDEESSCCRRIIPPTTIIOONN
  13.      The aasssseerrtt() macro tests the given _e_x_p_r_e_s_s_i_o_n and if it is false, the
  14.      calling process is terminated.  A diagnostic message is written to _s_t_d_e_r_r
  15.      and the abort(3) function is called, effectively terminating the program.
  16.  
  17.      If _e_x_p_r_e_s_s_i_o_n is true, the aasssseerrtt() macro does nothing.
  18.  
  19.      The aasssseerrtt() macro may be removed at compile time with the cc(1) option
  20.      --DDNNDDEEBBUUGG.
  21.  
  22. DDIIAAGGNNOOSSTTIICCSS
  23.      The following diagnostic message is written to _s_t_d_e_r_r if _e_x_p_r_e_s_s_i_o_n is
  24.      false:
  25.  
  26.            "assertion \"%s\" failed: file \"%s\", line %d\n", \
  27.                                "expression", __FILE__, __LINE__);
  28.  
  29. SSEEEE AALLSSOO
  30.      cc(1),  abort(3)
  31.  
  32. SSTTAANNDDAARRDDSS
  33.      The aasssseerrtt() macro conforms to ANSI C3.159-1989 (``ANSI C'').
  34.  
  35. HHIISSTTOORRYY
  36.      A aasssseerrtt macro appeared in Version 6 AT&T UNIX.
  37.  
  38. BSD Experimental                 June 9, 1993                                1
  39.